<template>
  <div demo-bg>
   <dv-scroll-board :config="config" style="width:25vw;height:20vh;" @mouseover="mouseoverHandler" @click="clickHandler" />
  </div>
</template>

<script setup lang="ts">
import {reactive,onMounted} from 'vue'
import {getdetection} from '../../request/index'
const config=reactive({
    header:['序号','设备名称','设备状态'],
    data:null,
    index:true,
    columnWidth:[50],
    align:['center'],
})

onMounted(()=>{
    getdetection().then(res=>{
        console.log('设备检测数据',res.data.data);
        let alltab=res.data.data 
        let endtab=alltab.map(obj=>Object.values(obj))
            console.log('333',endtab);
            config.data=endtab
    })
})


    const mouseoverHandler=(e:any)=>{
        console.log(e);  
    }

    const clickHandler=(e:any)=>{
        console.log(e);
        
    }

</script>
